#include<iostream>
using namespace std;
typedef long long LL;

const int N = 1e5+10;

int n, m;

LL f[N];


int main()
{
	cin >> n >> m;
	for (int i = 1; i <= n; i++)
	{
		LL x; cin >> x;
		f[i] += x;
		f[i + 1] -= x;
	}

	while (m--)
	{
		LL  r, l, k; cin >> r >> l >> k;
		f[r] += k;
		f[l + 1] -= k;
	}

	for (int i = 1; i <= n; i++)
	{
		f[i] += f[i - 1];
		cout << f[i] << " ";

	}
	return 0;
}